package com.mu.cloud.feign.controller;

import com.mu.cloud.feign.entity.ContacterDO;
import com.mu.cloud.feign.util.DozerUtil;
import com.mu.cloud.feign.vo.ContacterVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class ContacterController {

    @GetMapping("/contacter")
    public ContacterDO add(ContacterVO contacterVO) {
        List<ContacterVO> voList=new ArrayList<>();
        voList.add(contacterVO);
        long start = System.currentTimeMillis();
        ContacterDO list = DozerUtil.convert(contacterVO, ContacterDO.class);
        long end=System.currentTimeMillis();
        System.out.println((end-start));
        return list;
    }
}
